pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    let mut a: u32 = 0;
    let mut b: u32 = 1;
    let mut sum: u32 = 1;

    for _ in 0..threshold {
        let temp = a;
        a = b;
        b = temp + b;

        if b > threshold
        {
            return sum;
        }

        if b % 2 == 1 {
            sum += b;
        }
    }

    sum
}
